<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
  	<head>
    	<title>BOM Manager</title>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<!-- 指定以IE8的方式来渲染 -->
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
    	<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
		<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
		<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
		<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
		<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
		<script src="<%=path %>/js/smrp/manage/Bom.js"></script>
		<script>
			var kid = ${sessionScope.user.id};
			var path = "<%=path%>";
			var clientIp = "<%=clientIp%>";
		</script>
  	</head>
	<body>
	 	<!-- 查询 -->
		<div id = "searchPanel"	class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
			<table id="searchTable">
				<tr>
					<td>Item:</td>
					<td>
						<input type="text" name="item" id="item1"  style="width:100px;"/>
					</td>
					<td>&nbsp;</td>
					<td>
						<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
						<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
					</td>
				</tr>
			</table>
		</div>
		
		<!-- 数据显示table -->
		<div id = "tablePanel"	class="easyui-panel" style="padding:1px;top:300px;" title="BOM 列表" iconCls="icon-list" collapsible="true" closable="false">
			<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
		</div>
	    <div id="BomDlg" class="easyui-dialog" style="width:580px;padding:10px 20px"
	            closed="true" buttons="#dlg-buttons" modal="true" collapsible="false" closable="true">
			<form id="BomFM">
				<table>
					<tr>
						<td style="width: 80px;height: 20px">Item</td>
						<td style="width: 180px;padding:1px">
							<input name="item" id="item" class="easyui-validatebox" data-options="required:true,validType:'length[1,30]'" style="width: 160px;height: 20px"/>
						</td>
						<td style="width: 60px;height: 20px">Qty.</td>
						<td style="width:180px;padding:1px;">
							<input name="qty" id="qty" class="easyui-validatebox" style="width: 160px;height: 20px"/>
						</td>
					</tr>
					<tr>
						<td>Ref.Designator</td>
						<td style="padding:1px;">
							<input name="ref_designator" id="ref_designator" class="easyui-validatebox" style="width: 160px;height: 20px"/>
						</td>
						<td>Complete Part No. or Doc.No</td>
						<td style="padding:1px;">
							<input name="complete_part" id="complete_part" class="easyui-validatebox" style="width: 160px;height: 20px"/>
						</td>
					</tr>
					<tr>
						<td>Description</td>
						<td style="padding:1px">
							<input name="description" id="description" class="easyui-validatebox"  style="width: 160px;height: 20px"/>
						</td>
						<td>Pakage type or Doc Type</td>
						<td style="padding:1px;">
							<input name="pakage_type_or_doc_type" id="pakage_type_or_doc_type" class="easyui-validatebox" style="width: 160px;height: 20px"/>
						</td>
					</tr>
					<tr>
						<td>Value or Rev.</td>
						<td style="padding:1px">
							<input name="value_or_rev" id="value_or_rev" class="easyui-validatebox" style="width: 160px;height: 20px"/>
						</td>
						<td>Voltage</td>
						<td style="padding:1px">
							<input name="voltage" id="voltage" type="text" class="easyui-numberbox"  style="width: 160px;height: 20px" />
						</td>
					</tr>
						<td>Tolerances</td>
						<td style="padding:1px">
							<input name="tolerances" id="tolerances" type="text" class="easyui-numberbox"  style="width: 160px;height: 20px" />
						</td>
						<td>Special Comments</td>
						<td style="padding:1px">
							<input name="special_comments" id="special_comments" type="text" class="easyui-numberbox"  style="width: 160px;height: 20px" />
						</td>
					</tr>
					<tr>
						<td>RoHS</td>
						<td style="padding:1px">
							<input name="rohs" id="rohs" class="easyui-validatebox" style="width: 160px;height: 20px"/>
						</td>
						<td>Temperature Range</td>
						<td style="padding:1px">
							<input name="temperature_range" id="temperature_range" type="text" class="easyui-numberbox"  style="width: 160px;height: 20px" />
						</td>
					</tr>
						<td>Manufacturer</td>
						<td style="padding:1px">
							<input name="manufacturer" id="manufacturer" type="text" class="easyui-numberbox"  style="width: 160px;height: 20px" />
						</td>
						<td>Supplier</td>
						<td style="padding:1px">
							<input name="supplier" id="supplier" type="text" class="easyui-numberbox"  style="width: 160px;height: 20px" />
						</td>
					</tr>
					<tr>
						<td>Supplier Part No.</td>
						<td style="padding:1px">
							<input name="supplier_part_no" id="supplier_part_no" class="easyui-validatebox" style="width: 160px;height: 20px"/>
						</td>
						<td>Second source Manufacturer</td>
						<td style="padding:1px">
							<input name="second_source_manufacturer" id="second_source_manufacturer" type="text" class="easyui-numberbox"  style="width: 160px;height: 20px" />
						</td>
					</tr>
						<td>Second source Part no.</td>
						<td style="padding:1px">
							<input name="second_source_part_no" id="second_source_part_no" type="text" class="easyui-numberbox"  style="width: 160px;height: 20px" />
						</td>
						<td>DR Part Number</td>
						<td style="padding:1px">
							<input name="dr_rart_number" id="dr_rart_number" type="text" class="easyui-numberbox"  style="width: 160px;height: 20px" />
						</td>
					</tr>
				</table>
			</form>
	    </div>
	    <div id="dlg-buttons">
	        <a href="javascript:void(0)" id="saveBom" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
	        <a href="javascript:void(0)" id="cancelBom" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#BomDlg').dialog('close')">取消</a>
	    </div>

		<!-- 导入excel表格 -->
		<div id="importExcelDlg" style="padding:10px 20px">
			<form id="importExcelFM" method="post" enctype="multipart/form-data" action="<%=path%>/bom/importExcelBom.action">
				<div class="fitem" style="padding:5px">
					<label>文件名称&nbsp;&nbsp;</label>
					<input name="BomFile" id="BomFile" type="file" style="width: 230px;height: 20px"/>
				</div>
				<div class="fitem" style="padding:5px">
					<label><b>导入注意</b>&nbsp;&nbsp;</label><span>（由于excel2003和excel2007版本的问题，请导入文件后缀名.xls的表格）</span>
				</div>
				<div class="fitem" style="padding:5px;display: none;">
					<label>是否审查&nbsp;&nbsp;</label>
					<select id ="isCheck" name="isCheck" style="width: 230px;height: 20px">
						<option value="0">是</option>
						<option value="1" selected="selected">否</option>
					</select>
				</div>
				<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
				<div id="dlg-buttons5">
					<a href="javascript:void(0)" id="saveimport" class="easyui-linkbutton" iconCls="icon-ok">导入</a>
					<a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a>
				</div>
			</form>
		</div>
   </body>
</html>